{% extends "account/base.html" %}

{% load css_class i18n account socialaccount %}

{% block head-title %}{% trans "Log in" %} - {% endblock %}

{% block content %}

{% get_providers as socialaccount_providers %}

<div class="central-form">
    <ul class="nav nav-tabs" role="tablist">
        <li role="presentation" class="active">
            <a role="tab"
               data-toggle="tab"
               aria-controls="home"
               href="#">{% trans 'Log in' %}</a>
        </li>
        {% get_providers as socialaccount_providers %}
        {% for provider in socialaccount_providers %}
            <li role="presentation">
                <a title="{{ provider.name }}"
                   class="socialaccount_provider {{ provider.id }}"
                   href="{% provider_login_url provider.id process='login' scope=scope auth_params=auth_params %}">{% trans 'Log in with GitHub' %} </a>
            </li>
        {% endfor %}
    </ul>

    <div class="auth-form">
        <form method="POST" action="{% url 'account_login' %}">
            {% csrf_token %}
            {% include 'form-fields.html' %}
            <p><button class="btn btn-primary btn-block" type="submit">{% trans 'Log in' %}</button></p>
            <p class="row text-center">
                <a class="col-lg-6" href="{% url 'account_reset_password' %}">{% trans 'Forgot password' %}</a>
                <a class="col-lg-6" href="{% url 'account_signup' %}">{% trans 'Register' %}</a>
            </p>

            {% if redirect_field_value %}
                <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
            {% endif %}
        </form>
    </div>
</div>

{% endblock %}
